package higkoo.web;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Servlet extends HttpServlet {	
	public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
		try {
			Thread.sleep(10000);
			print(request, response);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	private void print(HttpServletRequest request,HttpServletResponse response){
		ServletOutputStream pOut = null;
		try {
			pOut = response.getOutputStream();
		} catch (IOException e) {
			e.printStackTrace();
		}
		String paramStr = request.getParameter("param");
		try {
			pOut.print("You put : " + paramStr + "! ");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
